<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>   
<%@ taglib uri="/struts-tags" prefix="s" %>   
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">   
<html>   
  <head>   
      
    <title>产品分类列表</title>   
       
    <meta http-equiv="pragma" content="no-cache">   
    <meta http-equiv="cache-control" content="no-cache">   
    <meta http-equiv="expires" content="0">       
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">   
    <meta http-equiv="description" content="This is my page">   

    <link rel="stylesheet" type="text/css" href="/css/fenye.css">   
  
  </head>   
     
  <body>   
  <center><h1><font color="red">ProductType List</font></h1></center>
  <s:form method="post" action="producttype_list.do">
  <s:hidden name="parentID"></s:hidden>
  <table border="1" width="80%" align="center">
    	<tr>
    		<td colspan="5" align="left">
    		<c:set var="menuout" value=""/>
			<c:forEach items="${menutypes}" var="menu">
				<c:set var="menuout" value="&gt;&gt;<a href='producttype_list.do?type.id=${menu.id}'>${menu.name}</a> ${menuout}"/>
			</c:forEach>
			产品类别列表,请选择分类:<br>
			导航:<a href='producttype_list.do'>顶级目录</a> <c:out value="${menuout}" escapeXml="false"/>
    		</td>
    		<td colspan="1" align="right"><s:a href="producttype_addUI.do?parentID=%{type.id}">添加分类</s:a></td>
    	</tr>
    	<tr>
    		<td>编号</td>
    		<td>修改</td>
    		<td>产品分类名称</td>
    		<td>创建下级类别</td>
    		<td>所属父类</td>
    		<td>备注</td>
    	</tr>	
    	<s:iterator id="t" value="types">
    	<tr>
    		<td>${t.id} </td>
    		<td><s:a href="producttype_editUI.do?type.id=%{#t.id}">修改</s:a></td>
    		<td><s:a href="producttype_list.do?type.id=%{#t.id}">${t.name}</s:a></td>
    		<td><s:a href="producttype_addUI.do?parentID=%{#t.id}">创建子类别</s:a></td>
    		<td>&nbsp;${t.parent.name}</td>
    		<td>&nbsp;${t.note}</td>
    	</tr>
    	</s:iterator>
    	<tr>
    		<td colspan="6" align="center">
    			${pagination}	
    		</td>
    	</tr>
    </table>  
    </s:form>
  </body>   
</html>